We say that a set of natural numbers is --special if:
for every we have ,
the sum of all integers from is greater than ,
does not contain a pair of consecutive natural numbers.
Task
Write a program that:
reads two natural numbers and from the standard input,
computes the number of --special sets,
writes the result to the standard output.
Input
In the first line of the standard input there are two natural numbers and
separated by a single space, , .
Output
In the first line of the standard output there should be written one non-negative integer,
which equals the number of --special sets for the given and .
Example
For the input data:
5 6
the correct result is:
3
Task author: Wojciech Rytter.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.